using System.Collections.Generic;
using Framework.Timer;
using IcecreamView;
using MintAnimation.Runtime.Components.MintAnimation;

namespace View
{
    public class LoadingPanel : IcecreamView.IC_AbstractModule
    {
        public MintAnimGraphicAlpha animGraphicAlpha;
        public MintAnimGraphicAlpha animGraphicAlpha_BG;
        public override void OnInitView() {}

        public override void OnOpenView(Dictionary<string,IC_ViewData> parameters) {}

        public override void OnCloseView() 
        {
            ViewConnector.Await();
            animGraphicAlpha.MintPlayer.TweenOptions.IsFlip = true;
            animGraphicAlpha.MintPlayer.Tween.OnComplete += ViewConnector.Continue;
            animGraphicAlpha.StartAnim();
        }
        public void CloseBG() 
        {
            animGraphicAlpha_BG.StartAnim();
        }
    }
}